<template>
  <div>
    <h2>index组件：</h2>
    <div>
      父组件的值：a:{{ a }},b:{{ b }},c:{{ c }},d:{{ d }}
    </div>
    <div>
      <Child :a="a" :b="b" :c="c" :d="d" v-bind="{ x: 100, y: 200 }" :updateB="updateB" />
    </div>
  </div>
</template>
<script setup lang="ts">
import Child from '@views/communication/05_$attrs/Child.vue'

const a = ref('1')
const b = ref('2')
const c = ref('3')
const d = ref('4')

const updateB = (val: string) => {
  b.value = val
}
</script>
<style scoped></style>
